<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>文章管理 - 文章分类</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 文章分类 </h3>
        <ul class="page-breadcrumb breadcrumb">
        <?php
			if($this->pvadd || $this->pvedit){?>
          <li class="btn-group">
            <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true"> <span>操作</span> <i class="icon-angle-down"></i> </button>
            <ul class="dropdown-menu pull-right" role="menu">
              <? if($this->pvadd){?>
				  <li><a href="/article/classadd"><i class="icon-plus"></i> 新增分类</a></li>
                  <?
			  }
			  ?>
              <? if($this->pvedit){?>
				  <li><a href="/article/classsort?caid=0"><i class="icon-sort-by-attributes"></i> 大类排序</a></li>
                  <?
			  }
			  ?>
            </ul>
          </li>
          <?
			}
			?>
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 文章管理 <i class="icon-angle-right"></i> </li>
          <li>文章分类</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-6"> 
        <!-- BEGIN SAMPLE TABLE PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"><i class="icon-reorder"></i>列表</div>
            <div class="tools"> <a href="javascript:;" class="collapse"></a> </div>
          </div>
          <div class="portlet-body">
            <table class="table table-hover">
              <thead>
                <tr>
                  <th>名称</th>
                  <th>状态</th>
                  <th>操作</th>                  
                </tr>
              </thead>
              <?php
			  if($this->data[0]){
				foreach($this->data[0] as $k=>$r){
					?>	
                    <tbody>
                    <tr class="note note-info">                    
                    <td><?=$r['name'];?></td>
                    <td><?=$this->c['stat']['normal'][$r['stat']];?></td>
                    <td>
                    <?php
					if($this->pvedit){
						?>
                        <a href="/article/classedit?caid=<?=$r['caid'];?>" class="btn btn-xs blue"><i class="icon-edit"></i> 编辑</a>
                        <a href="/article/classsort?caid=<?=$r['caid'];?>" class="btn btn-xs blue"><i class="icon-sort-by-attributes"></i> 排序</a>
                        <?
					}
					else echo '--';
						?>
                    </td>
                    </tr>
                    <?php
					if($this->data[$r['caid']]){
						foreach($this->data[$r['caid']] as $j=>$s){
							if($r['stat']>1) $s['stat'] = $r['stat'];
						?>
                        <tr>
                        <td style="padding-left:30px;"><?=$s['name'];?></td>
                        <td><?=$this->c['stat']['normal'][$s['stat']];?></td>
                        <td><?php
					if($this->pvedit){
						?>
                        <a href="/article/classedit?caid=<?=$s['caid'];?>" class="btn btn-xs blue"><i class="icon-edit"></i> 编辑</a>
                        <?
					}
					else echo '--';
						?></td>
                        </tr>
                        <?	
						}
					}?>
                    	
                    
                    </tbody>
                <?
				}
			  }
			  ?>
            </table>
          </div>
        </div>
        <!-- END SAMPLE TABLE PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
		jQuery(document).ready(function() {    
		   App.init();
		});
	</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>